Imports KanBan.Pgd.Domain.Entities

Namespace Entities

    Public Class GoalDefinition
        Implements IDomainEntity

        Protected Sub New()

        End Sub

        Public Sub New(ByVal id As Guid, ByVal name As String, ByVal area As Area, ByVal profile As Profile)

            Dim cachedDateTime As DateTime = DateTime.Now

            Me.Id = id
            Me.Name = name
            Me.Area = area
            Me.Profile = profile
            Me.CreatedDate = cachedDateTime
            Me.LastModified = cachedDateTime

        End Sub

        Public Sub New(ByVal name As String, ByVal area As Area, ByVal profile As Profile)

            Me.New(Guid.NewGuid(), name, area, profile)

        End Sub


        Private _id As Guid
        Public Overridable Property Id() As System.Guid Implements Entities.IDomainEntity.Id
            Get
                Return _id
            End Get
            Set(ByVal value As System.Guid)
                _id = value
            End Set
        End Property

        Private _name As String
        Public Overridable Property Name() As String
            Get
                Return _name
            End Get
            Set(ByVal value As String)
                _name = value
            End Set
        End Property

        Private _description As String
        Public Overridable Property Description() As String
            Get
                Return _description
            End Get
            Set(ByVal value As String)
                _description = value
            End Set
        End Property

        Private _area As Area
        Public Overridable Property Area() As Area
            Get
                Return _area
            End Get
            Set(ByVal value As Area)
                _area = value
            End Set
        End Property

        Private _profile As Profile
        Public Overridable Property Profile() As Profile
            Get
                Return _profile
            End Get
            Set(ByVal value As Profile)
                _profile = value
            End Set
        End Property

        Private _createdDate As DateTime

        Public Overridable Property CreatedDate() As Date Implements IDomainEntity.CreatedDate
            Get
                Return _createdDate
            End Get
            Set(ByVal value As Date)
                _createdDate = value
            End Set
        End Property

        Private _lastModified As DateTime
        Public Overridable Property LastModified() As Date Implements IDomainEntity.LastModified
            Get
                Return _lastModified
            End Get
            Set(ByVal value As Date)
                _lastModified = value
            End Set
        End Property

        Private _isDeleted As Boolean
        Public Overridable Property IsDeleted() As Boolean Implements Entities.IDomainEntity.IsDeleted
            Get
                Return _isDeleted
            End Get
            Set(ByVal value As Boolean)
                _isDeleted = value
            End Set
        End Property


        Public Overridable Sub Validate() Implements IValidableEntity.Validate

        End Sub

        Public Overridable Sub ValidateDelete() Implements IValidableEntity.ValidateDelete

        End Sub
    End Class

End Namespace
